package com.johnny.data;

import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class RoomInfo extends Info {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5623484534536498808L;

	private String roomId;
	private long minBet;
	private long maxBet;
	private long[] chips;
	private List<TableInfo> tables;
	private List<String> players;
	public String getRoomId() {
		return roomId;
	}
	public void setRoomId(String roomId) {
		this.roomId = roomId;
	}
	public long getMinBet() {
		return minBet;
	}
	public void setMinBet(long minBet) {
		this.minBet = minBet;
	}
	public long getMaxBet() {
		return maxBet;
	}
	public void setMaxBet(long maxBet) {
		this.maxBet = maxBet;
	}
	public long[] getChips() {
		return chips;
	}
	public void setChips(long[] chips) {
		this.chips = chips;
	}
	public List<TableInfo> getTables() {
		return tables;
	}
	public void setTables(List<TableInfo> tables) {
		this.tables = tables;
	}
	
	public List<String> getPlayers() {
		return players;
	}
	public void setPlayers(List<String> players) {
		this.players = players;
	}
	@Override
	public JSONObject toJsonObject() {
		JSONObject object=new JSONObject();
		object.put("roomId", roomId);
		object.put("minBet", minBet);
		object.put("maxBet", maxBet);
		object.put("chips", chips);
		object.put("tables", JSONArray.fromObject(tables));
		object.put("players", JSONArray.fromObject(players));
		return object;
	}
	
	
}
